﻿using LogicLayer;
using LogicLayer.rabbit;
using LogicLayer.xk;
using Microsoft.Practices.Unity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Unity_IocDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            IOC_Factory ioc = new IOC_Factory();//ioc容器
            ioc.register<ICooker, potatoHelper>();//注册依赖关系
            ioc.register<IPerson, perosin>();
            Operater operater1 = ioc.GetOperater<Operater>();//注入依赖关系
            operater1.person.eat();
            operater1.cook();
            Console.Read();
        }
    }
}
